package com.jame.design_mode.proxy.static_proxy;

import com.jame.design_mode.proxy.Demo;
import com.jame.design_mode.proxy.DemoInterface;

/**
 * @author : Jame
 * @date : 2021-06-30 10:01
 **/
public class StaticProxy implements DemoInterface {

    private Demo demo;


    //设置被代理对象的方法
    public void setDemo(Demo demo){
        this.demo=demo;
    }

    @Override
    public void Get(String s) {
        System.out.println("代理前置方法");
        demo.Get(s);
        System.out.println("代理后置方法");
    }
}
